<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>数据类型 | ccplus</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../c/operator.html" />
    
    
    <link rel="prev" href="../c/Hello.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.2"
        data-chapter-title="数据类型"
        data-filepath="c/DataType.md"
        data-basepath=".."
        data-revision="Fri May 13 2016 17:02:07 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        目录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="Android/index.html">
            
                
                    <a href="../Android/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Android
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="Android/touchEvent.html">
            
                
                    <a href="../Android/touchEvent.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        触摸点击事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="Android/screenAdaptation.html">
            
                
                    <a href="../Android/screenAdaptation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        屏幕适配
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Android/android4.0.html">
            
                
                    <a href="../Android/android4.0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        4.0
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="c/index.html">
            
                
                    <a href="../c/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        c
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="c/Hello.html">
            
                
                    <a href="../c/Hello.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        Hello
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.2" data-path="c/DataType.html">
            
                
                    <a href="../c/DataType.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="c/operator.html">
            
                
                    <a href="../c/operator.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="c/array.html">
            
                
                    <a href="../c/array.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        数组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="c/pointer.html">
            
                
                    <a href="../c/pointer.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        指针
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="c/variables.html">
            
                
                    <a href="../c/variables.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        变量
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="c/statement.html">
            
                
                    <a href="../c/statement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="c/file.html">
            
                
                    <a href="../c/file.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="c/structure.html">
            
                
                    <a href="../c/structure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        结构体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="c/function.html">
            
                
                    <a href="../c/function.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="c/multisource.html">
            
                
                    <a href="../c/multisource.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.</b>
                        
                        多个源文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="c/gdb.html">
            
                
                    <a href="../c/gdb.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.</b>
                        
                        gdb调试
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="linux/index.html">
            
                
                    <a href="../linux/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        Linux
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="linux/command/index.html">
            
                
                    <a href="../linux/command/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        命令
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="c++/index.html">
            
                
                    <a href="../c++/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        C++
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="c++/section1.html">
            
                
                    <a href="../c++/section1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        第一节
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="c++/section2.html">
            
                
                    <a href="../c++/section2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        第二节
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="java/index.html">
            
                
                    <a href="../java/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        java
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="java/jni-java.html">
            
                
                    <a href="../java/jni-java.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        jni-java
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="java/jni-android.html">
            
                
                    <a href="../java/jni-android.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        jni-android
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="gitbook/index.html">
            
                
                    <a href="../gitbook/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        gitbook
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="gitbook/installation.html">
            
                
                    <a href="../gitbook/installation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="gitbook/commands.html">
            
                
                    <a href="../gitbook/commands.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        命令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="gitbook/syntax.html">
            
                
                    <a href="../gitbook/syntax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="gitbook/settings.html">
            
                
                    <a href="../gitbook/settings.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="gitbook/plugins.html">
            
                
                    <a href="../gitbook/plugins.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.</b>
                        
                        插件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="gitbook/bookjson.html">
            
                
                    <a href="../gitbook/bookjson.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.</b>
                        
                        json
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >ccplus</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x6570;&#x636E;&#x7C7B;&#x578B;">&#x6570;&#x636E;&#x7C7B;&#x578B;</h1>
<h3 id="&#x5206;&#x7C7B;">&#x5206;&#x7C7B;</h3>
<table>
<thead>
<tr>
<th>&#x6570;&#x636E;&#x7C7B;&#x578B;</th>
<th style="text-align:center">&#x5206;&#x7C7B;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;</td>
<td style="text-align:center">&#x6574;&#x578B;,&#x6D6E;&#x70B9;&#x578B;,&#x5B57;&#x7B26;&#x578B;,&#x679A;&#x4E3E;&#x578B;</td>
<td>&#x5176;&#x503C;&#x4E0D;&#x53EF;&#x4EE5;&#x518D;&#x5206;&#x89E3;&#x4E3A;&#x5176;&#x5B83;&#x7C7B;&#x578B;&#x3002;&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x662F;&#x81EA;&#x6211;&#x8BF4;&#x660E;&#x7684;</td>
</tr>
<tr>
<td>&#x6784;&#x9020;&#x6570;&#x636E;&#x7C7B;&#x578B;</td>
<td style="text-align:center">&#x6570;&#x7EC4;&#x3001;&#x7ED3;&#x6784;&#x3001;&#x8054;&#x5408;&#x7C7B;&#x578B;</td>
<td>&#x4E00;&#x4E2A;&#x6784;&#x9020;&#x7C7B;&#x578B;&#x7684;&#x503C;&#x53EF;&#x4EE5;&#x5206;&#x89E3;&#x6210;&#x82E5;&#x5E72;&#x4E2A;&#x201C;&#x6210;&#x5458;&#x201D;&#x6216;&#x201C;&#x5143;&#x7D20;&#x201D;&#x3002;&#x6BCF;&#x4E2A;&#x201C;&#x6210;&#x5458;&#x201D;&#x90FD;&#x662F;&#x4E00;&#x4E2A;&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x6216;&#x53C8;&#x662F;&#x4E00;&#x4E2A;&#x6784;&#x9020;&#x7C7B;&#x578B;&#x3002;</td>
</tr>
<tr>
<td>&#x6307;&#x9488;&#x7C7B;&#x578B;</td>
<td style="text-align:center">--</td>
<td>&#x5176;&#x503C;&#x7528;&#x6765;&#x8868;&#x793A;&#x67D0;&#x4E2A;&#x91CF;&#x5728;&#x5185;&#x5B58;&#x50A8;&#x5668;&#x4E2D;&#x7684;&#x5730;&#x5740;</td>
</tr>
<tr>
<td>&#x7A7A;&#x7C7B;&#x578B;</td>
<td style="text-align:center">--</td>
<td>&#x5176;&#x7C7B;&#x578B;&#x8BF4;&#x660E;&#x7B26;&#x4E3A;void</td>
</tr>
</tbody>
</table>
<h3 id="&#x81EA;&#x52A8;&#x7C7B;&#x578B;&#x8F6C;&#x6362;">&#x81EA;&#x52A8;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</h3>
<p>&#x5B57;&#x8282;&#x5C0F;&#x7684;&#x53EF;&#x4EE5;&#x5411;&#x5B57;&#x8282;&#x5927;&#x7684;&#x81EA;&#x52A8;&#x8F6C;&#x6362;&#xFF0C;&#x4F46;&#x5B57;&#x8282;&#x5927;&#x7684;&#x4E0D;&#x80FD;&#x5411;&#x5B57;&#x8282;&#x5C0F;&#x7684;&#x81EA;&#x52A8;&#x8F6C;&#x6362;&#x3002;<br>&#x4F8B;&#x5982;:&#x5B57;&#x7B26;&#x7C7B;&#x578B;&#x53EF;&#x4EE5;&#x81EA;&#x52A8;&#x8F6C;&#x6362;&#x4E3A;&#x6574;&#x578B;&#xFF1B;
&#x6574;&#x578B;&#x53EF;&#x4EE5;&#x81EA;&#x52A8;&#x8F6C;&#x6362;&#x4E3A;&#x6D6E;&#x70B9;&#x7C7B;&#x578B;&#xFF1B;</p>
<h3 id="&#x5F3A;&#x5236;&#x7C7B;&#x578B;&#x8F6C;&#x6362;">&#x5F3A;&#x5236;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</h3>
<p>&#x5F3A;&#x5236;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x662F;&#x901A;&#x8FC7;&#x5B9A;&#x4E49;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x8FD0;&#x7B97;&#x6765;&#x5B9E;&#x73B0;&#x7684;&#x3002;&#x5176;&#x4E00;&#x822C;&#x5F62;&#x5F0F;&#x4E3A;&#xFF1A;
(&#x6570;&#x636E;&#x7C7B;&#x578B;)(&#x8868;&#x8FBE;&#x5F0F;)</p>
<blockquote>
<p>&#x6CE8;&#x610F;:&#x6570;&#x636E;&#x7C7B;&#x578B;&#x548C;&#x8868;&#x8FBE;&#x5F0F;&#x90FD;&#x5FC5;&#x987B;&#x52A0;&#x62EC;&#x53F7;&#xFF0C;&#x5982;&#x628A;(int)(x/2+y)&#x5199;&#x6210;(int) x/2+y&#x5219;&#x6210;&#x4E86;&#x628A;x&#x8F6C;&#x6362;&#x6210;int&#x578B;&#x4E4B;&#x540E;&#x518D;&#x9664;2&#x518D;&#x4E0E;y&#x76F8;&#x52A0;&#x4E86;&#x3002;<br>  &#x8F6C;&#x6362;&#x540E;&#x4E0D;&#x4F1A;&#x6539;&#x53D8;&#x539F;&#x6570;&#x636E;&#x7684;&#x7C7B;&#x578B;&#x53CA;&#x53D8;&#x91CF;&#x503C;&#xFF0C;&#x53EA;&#x5728;&#x672C;&#x6B21;&#x8FD0;&#x7B97;&#x4E2D;&#x4E34;&#x65F6;&#x6027;&#x8F6C;&#x6362;&#x3002;<br>  &#x5F3A;&#x5236;&#x8F6C;&#x6362;&#x540E;&#x7684;&#x8FD0;&#x7B97;&#x7ED3;&#x679C;&#x4E0D;&#x9075;&#x5FAA;&#x56DB;&#x820D;&#x4E94;&#x5165;&#x539F;&#x5219;.      </p>
</blockquote>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../c/Hello.html" class="navigation navigation-prev " aria-label="Previous page: Hello"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../c/operator.html" class="navigation navigation-next " aria-label="Next page: 运算符"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
